package cn.com.connext.scrm.repository.master;

import cn.com.connext.scrm.domain.master.QrCode;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author cuijian
 * @date 2021/5/11
 */
@Repository
public interface QrCodeRepository extends JpaRepository<QrCode, String>, JpaSpecificationExecutor {

    @Query(value = "select * from applet_qr_code where scene_name like CONCAT('%',:sceneName,'%')", nativeQuery = true)
    List<QrCode> queryQrCodesBySceneName(@Param("sceneName") String sceneName);

}
